package com.cndw.kungfu.dao;

import java.util.List;

import com.cndw.dao.jade.annotation.DAO;
import com.cndw.dao.jade.annotation.SQL;
import com.cndw.dao.jade.annotation.SQLParam;

import com.cndw.kungfu.domain.Monster;
import com.cndw.kungfu.domain.MonsterAi;

@DAO
public interface MonsterDao {
	
	public static final String TABLE = "kfsys_monster";
	
	public static final String FIELDS = "id,name,icon,type,level,hp,mp,attack,defense,hit,crit,tough,dodge,attackSpeed,assetR,asset,exp,boss,itemFallMax,itemFallData,talkR,talkData,moveSpeed,initiative,ai";
	
	public static final String Table_Ai = "kfsys_monster_ai";
	
	public static final String Fields_Ai = "id,name,configValue";
	
	
	@SQL("select "+FIELDS+" from "+TABLE+" where id=:id ")
	public Monster getById(@SQLParam("id") int id);
	
	
	@SQL("select "+FIELDS+" from "+TABLE+"  order by id asc ")
	public List<Monster> getMonsters();
	
	@SQL("select "+Fields_Ai+" from "+Table_Ai+"  order by id asc ")
	public List<MonsterAi> getMonsterAis();
	
}
